# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=deepin-clipboard
pkgver=5.4.25
pkgrel=3
pkgdesc='DDE clipboard manager component'
arch=('loong64' 'x86_64')
url="https://github.com/linuxdeepin/dde-clipboard"
license=('GPL3')
depends=('deepin-qt5integration' 'gio-qt' 'kwayland' 'deepin-qt-dbus-factory')
makedepends=('cmake' 'ninja' 'gtest' 'qt5-tools')
groups=('deepin-extra')
source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxdeepin/dde-clipboard/archive/$pkgver.tar.gz")
sha512sums=('af8a67b79f5bc67d2fad48e7529c5d41d1541b24af927aaea36e1064c6252f5e3e46198a95ce280f6796a5904b573a882eb2180d1345506e8d9d25665d1d1193')

prepare() {
  mkdir -p build
  sed -i 's|DESTINATION /lib/systemd/user|DESTINATION /usr/lib/systemd/user|' dde-clipboard-$pkgver/CMakeLists.txt
}

build() {
  cd build
  cmake -GNinja ../dde-clipboard-$pkgver
  ninja
}

package() {
  cd build
  DESTDIR="$pkgdir" ninja install
}
